#include <iostream>
using namespace std;
int a[40][40];
void init() {
    a[0][0] = 1;
    for(int i = 1; i <= 38; i++) {
        a[i][0] = a[i][i] = 1;
        for(int j = 1; j <= 38; j++) {
            a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
        }
    }
}
int main() {
    init();
    int x, y;
    cin >> x >> y;
    if(x < y) {
        swap(x, y);
    }
    cout << a[x][y] << endl;
    return 0;
}